<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <title>Document</title>
    <style>
        .box {
            width:200px;
            height:200px;
            border-radius: 12px;
            background-color: pink;
        }
    </style>
</head>
<body>
    <div class="box">

    </div>
    <script src="libs/zepto/zepto.js"></script>
    <script src="libs/zepto/ajax.js"></script>
    <script src="libs/zepto/event.js"></script>
    <script src="libs/zepto/touch.js"></script>
    <script src="libs/zepto/selector.js"></script>
    <script src="libs/zepto/gesture.js"></script>

    <script src="js/vconsole.min.js"></script>
    <script>
        new VConsole();
        // var box = document.querySelector('.box');
        // box.gesturestart = function (e) {
        //     console.log(e.type);
        // }
        //仅仅在ios上支持
        // box.addEventListener('gesturestart', 
        //     function (e) {
        //         console.log('gesturestart');
        //     }
        // )

        // box.addEventListener('gestureend', 
        //     function (e) {
        //         console.log('gestureend');
        //     }
        // )

        // box.addEventListener(
        //     'gesturechange',
        //     function (e) {
        //         console.log('gesturechange');
        //         console.log(e.scale, '<--比例');
        //         console.log(e.rotation, '<--旋转');
        //     }
        // )
        // 这个是在Android上
        // box.addEventListener(
        //     'touchstart',
        //     function (e) {
        //         console.log(e);
        //     }
        // );

        // zepto 
        $('.box').on("gesturestart", function (e) {
            console.log("gesturestart");
        })

        $('.box').on("gestureend", function (e) {
            console.log("gestureend");
        })

        $('.box').on("gesturechange", function (e) {
            console.log("gesturechange");
            console.log(e.scale, '<--比例');
            console.log(e.rotation, '<--旋转');
        })



        
    </script>
</body>
</html>